package org.example.mutithread.sync;

public class Consumer implements Runnable {

    private Product product;

    public Consumer(Product product1) {
        this.product = product1;
    }

    @Override
    public void run() {
        int cnt = 10;
        for (int i = 0; i < cnt; i++) {
            product.consume();

        }

    }

}
